123456/PO PHP H5/Yannick - Matteo/Auto.php
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="style/style.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<html><h1>auto's</h1></html>
<table border="1">
<tr>
<th>Team ID</th>
<th>Teamnaam</th>
<th>oprichtingsjaar</th>
<th>teamleiderID</th>
</tr>
<button onclick="location.href='coureur.php'">coureurs</button>
<button onclick="location.href='Resultaten.php'">resultaten</button>
<button onclick="location.href='Races.php'">races</button>
<button onclick="location.href='index.php'">homepagina</button>
<?php
include('db2.php');
$query = "SELECT * FROM Auto";
$result = mysqli_query($db, $query);
while($row = mysqli_fetch_array($result)) {
echo "<tr>";
echo "<td>{$row['TeamID']}</td>";
echo "<td>{$row['Teamnaam']}</td>";
echo "<td>{$row['oprichtingsjaar']}</td>";
echo "<td><a href='Autodetails.php?TeamleiderID=" . $row['TeamleiderID'] . "'>{$row['TeamleiderID']}</td>";
echo "</tr>";
}
?>
</table>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse